Movable barrier operator

ABSTRACT

A movable barrier operator having improved safety and energy efficiency features automatically detects line voltage frequency and uses that information to set a worklight shut-off time. The operator automatically detects the type of door (single panel or segmented) and uses that information to set a maximum speed of door travel. The operator moves the door with a linearly variable speed from start of travel to stop for smooth and quiet performance. The operator provides for full door closure by driving the door into the floor when the DOWN limit is reached and no auto-reverse condition has been detected. The operator provides for user selection of a minimum stop speed for easy starting and stopping of sticky or binding doors.

This application is a continuation of application Ser. No. 09/804,407filed Mar. 12, 2001, which is a continuation of application Ser. No.09/535,221 filed Mar. 27, 2000, now U.S. Pat. No. 6,229,276, which is adivision-of application Ser. No. 09/161,840 filed Sep. 28, 1998, nowU.S. Pat. No. 6,172,475, which are all incorporated herein by reference.

BACKGROUND OF THE INVENTION

This invention relates generally to movable barrier operators foroperating movable barriers or doors. More particularly, it relates togarage door operators having improved safety and energy efficiencyfeatures.

Garage door operators have become more sophisticated over the yearsproviding users with increased convenience and security. However, userscontinue to desire further improvements and new features such asincreased energy efficiency, ease of installation, automaticconfiguration, and aesthetic features, such as quiet, smooth operation.

In some markets energy costs are significant. Thus energy efficiencyoptions such as lower horsepower motors and user control over theworklight functions are important to garage door operator owners. Forexample, most garage door operators have a worklight which turns on whenthe operator is commanded to move the door and shuts off a fixed periodof time after the door stops. In the United States, an illuminationperiod of 4½ minutes is considered adequate. In markets outside theUnited States, 4½ minutes is considered too long. Some garage dooroperators have special safety features, for example, which enable theworklight whenever the obstacle detection beam is broken by an intruderpassing through an open garage door. Some users may wish to disable theworklight in this situation. There is a need for a garage door operatorwhich can be automatically configured for predefined energy savingfeatures, such as worklight shut-off time.

Some movable barrier operators include a flasher module which causes asmall light to flash or blink whenever the barrier is commanded to move.The flasher module provides some warning when the barrier is moving.There is a need for an improved flasher unit which provides even greaterwarning to the user when the barrier is commanded to move.

Another feature desired in many markets is a smooth, quiet motor andtransmission. Most garage door operators have AC motors because they areless expensive than DC motors. However, AC motors are generally noisierthan DC motors.

Most garage door operators employ only one or two speeds of travel.Single speed operation, i.e., the motor immediately ramps up to fulloperating speed, can create a jarring start to the door. Then duringclosing, when the door approaches the floor at full operating speed,whether a DC or AC motor is used, the door closes abruptly with a highamount of tension on it from the inertia of the system. This jarring ishard on the transmission and the door and is annoying to the user.

If two operating speeds are used, the motor would be started at a slowspeed, usually 20 percent of full operating speed, then after a fixedperiod of time, the motor speed would increase to full operating speed.Similarly, when the door reaches a fixed point above/below theclose/open limit, the operator would decrease the motor speed to 20percent of the maximum operating speed. While this two speed operationmay eliminate some of the hard starts and stops, the speed changes canbe noisy and do not occur smoothly, causing stress on the transmission.There is a need for a garage door operator which opens the door smoothlyand quietly, with no abruptly apparent sign of speed change duringoperation.

Garage doors come in many types and sizes and thus different travelspeeds are required for them. For example, a one-piece door will bemovable through a shorter total travel distance and need to travelslower for safety reasons than a segmented door with a longer totaltravel distance. To accommodate the two door types, many garage dooroperators include two sprockets for driving the transmission. Atinstallation, the installer must determine what type of door is to bedriven, then select the appropriate sprocket to attach to thetransmission. This takes additional time and if the installer is theuser, may require several attempts before matching the correct sprocketfor the door. There is a need for a garage door operator whichautomatically configures travel speed depending on size and weight ofthe door.

National safety standards dictate that a garage door operator perform asafety reversal (auto-reverse) when an object is detected only one inchabove the DOWN limit or floor. To satisfy these safety requirements,most garage door operators include an obstacle detection system, locatednear the bottom of the door travel. This prevents the door from closingon objects or persons that may be in the door path. Such obstacledetection systems often include an infrared source and detector locatedon opposite sides of the door frame. The obstacle detector sends asignal when the infrared beam between the source and detector is broken,indicating an obstacle is detected. In response to the obstacle signal,the operator causes an automatic safety reversal. The door stops andbegins traveling up, away from the obstacle.

There are two different “forces” used in the operation of the garagedoor operator. The first “force” is usually preset or setable at twoforce levels: the UP force level setting used to determine the speed atwhich the door travels in the UP direction and the DOWN force levelsetting used to determine the speed at which the door travels in theDOWN direction. The second “force” is the force level determined by thedecrease in motor speed due to an external force applied to the door,i.e., from an obstacle or the floor. This external force level is alsopreset or setable and is any set-point type force against which thefeedback force signal is compared. When the system determines the setpoint force has been met, an auto-reverse or stop is commanded.

To overcome differences in door installations, i.e. stickiness andresistance to movement and other varying frictional-type forces, somegarage door operators permit the maximum force (the second force) usedto drive the speed of travel to be varied manually. This, however,affects the system's auto-reverse operation based on force. Theauto-reverse system based on force initiates an auto-reverse if theforce on the door exceeds the maximum force setting (the second force)by some predetermined amount. If the user increases the force setting todrive the door through a “sticky” section of travel, the user mayinadvertently affect the force to a much greater value than is safe forthe unit to operate during normal use. For example, if the DOWN forcesetting is set so high that it is only a small incremental value lessthan the force setting which initiates an auto-reverse due to force,this causes the door to engage objects at a higher speed before reachingthe auto-reverse force setting. While the obstacle detection system willcause the door to auto-reverse, the speed and force at which the doorhits the obstacle may cause harm to the obstacle and/or the door.

Barrier movement operators should perform a safety reversal off anobstruction which is only marginally higher than the floor, yet stillclose the door safely against the floor. In operator systems where thedoor moves at a high speed, the relatively large momentum of the movingparts, including the door, accomplishes complete closure. In systemswith a soft closure, where the door speed decreases from full maximum toa small percentage of full maximum when closing, there may beinsufficient momentum in the door or system to accomplish a fullclosure. For example, even if the door is positioned at the floor, thereis sometimes sufficient play in the trolley of the operator to allow thedoor to move if the user were to try to open it. In particular, insystems employing a DC motor, when the DC motor is shut off, it becomesa dynamic brake. If the door isn't quite at the floor when the DOWNtravel limit is reached and the DC motor is shut off, the door andassociated moving parts may not have sufficient momentum to overcome thebraking force of the DC motor. There is a need for a garage dooroperator which closes the door completely, eliminating play in the doorafter closure.

Many garage door operator installations are made to existing garagedoors. The amount of force needed to drive the door varies depending ontype of door and the quality of the door frame and installation. As aresult, some doors are “stickier” than others, requiring greater forceto move them through the entire length of travel. If the door is startedand stopped using the full operating speed, stickiness is not usually aproblem. However, if the garage door operator is capable of operation attwo speeds, stickiness becomes a larger problem at the lower speed. Insome installations, a force sufficient to run at 20 percent of normalspeed is too small to start some doors moving. There is a need for agarage door operator which automatically controls force output and thusstart and stop speeds.

SUMMARY OF THE INVENTION

A movable barrier operator having an electric motor for driving a garagedoor, a gate or other barrier is operated from a source of AC current.The movable barrier operator includes circuitry for automaticallydetecting the incoming AC line voltage and frequency of the alternatingcurrent. By automatically detecting the incoming AC line voltage anddetermining the frequency, the operator can automatically configureitself to certain user preferences. This occurs without either the useror the installer having to adjust or program the operator. The movablebarrier operator includes a worklight for illuminating its immediatesurroundings such as the interior of a garage. The barrier operatorsenses the power line frequency (typically 50 Hz or 60 Hz) toautomatically set an appropriate shut-off time for a worklight. Becausethe power line frequency in Europe is 50 Hz and in the U.S. is 60 Hz,sensing the power line frequency enables the operator to configureitself for either a European or a U.S. market with no user or installermodifications. For U.S. users, the worklight shut-off time is set topreferably 4½ minutes; for European users, the worklight shut-off timeis set to preferably 2½ minutes. Thus, a single barrier movementoperator can be sold in two different markets with automatic setup,saving installation time.

The movable barrier operator of the present invention automaticallydetects if an optional flasher module is present. If the module ispresent, when the door is commanded to move, the operator causes theflasher module to operate. With the flasher module present, the operatoralso delays operation of the motor for a brief period, say one or twoseconds. This delay period with the flasher module blinking before doormovement provides an added safety feature to users which warns them ofimpending door travel (e.g. if activated by an unseen transmitter).

The movable barrier operator of the present invention drives thebarrier, which may be a door or a gate, at a variable speed. After motorstart, the electric motor reaches a preferred initial speed of 20percent of the full operating speed. The motor speed then increasesslowly in a linearly continuous fashion from 20 percent to 100 percentof full operating speed. This provides a smooth, soft start withoutjarring the transmission or the door or gate. The motor moves thebarrier at maximum speed for the largest portion of its travel, afterwhich the operator slowly decreases speed from 100 percent to 20 percentas the barrier approaches the limit of travel, providing a soft, smoothand quiet stop. A slow, smooth start and stop provides a safer barriermovement operator for the user because there is less momentum to applyan impulse force in the event of an obstruction. In a fast system,relatively high momentum of the door changes to zero at the obstructionbefore the system can actually detect the obstruction. This leads to theapplication of a high impulse force. With the system of the invention, aslower stop speed means the system has less momentum to overcome, andtherefore a softer, more forgiving force reversal. A slow, smooth startand stop also provide a more aesthetically pleasing effect to the user,and when coupled with a quieter DC motor, a barrier movement operatorwhich operates very quietly.

The operator includes two relays and a pair of field effect transistors(FETs) for controlling the motor. The relays are used to controldirection of travel. The FET's, with phase controlled, pulse widthmodulation, control start up and speed. Speed is responsive to theduration of the pulses applied to the FETs. A longer pulse causes theFETs to be on longer causing the barrier speed to increase. Shorterpulses result in a slower speed. This provides a very fine ramp controland more gentle starts and stops.

The movable barrier operator provides for the automatic measurement andcalculation of the total distance the door is to travel. The total doortravel distance is the distance between the UP and the DOWN limits(which depend on the type of door). The automatic measurement of doortravel distance is a measure of the length of the door. Since shorterdoors must travel at slower speeds than normal doors (for safetyreasons), this enables the operator to automatically adjust the motorspeed so the speed of door travel is the same regardless of door size.The total door travel distance in turn determines the maximum speed atwhich the operator will travel. By determining the total distancetraveled, travel speeds can be automatically changed without having tomodify the hardware.

The movable barrier operator provides full door or gate closure, i.e. afirm closure of the door to the floor so that the door is not movable inplace after it stops. The operator includes a digital control orprocessor, specifically a microcontroller which has an internalmicroprocessor, an internal RAM and an internal ROM and an externalEEPROM. The microcontroller executes instructions stored in its internalROM and provides motor direction control signals to the relays and speedcontrol signals to the FETs. The operator is first operated in a learnmode to store a DOWN limit position for the door. The DOWN limitposition of the door is used as an approximation of the location of thefloor (or as a minimum reversal point, below which no auto-reverse willoccur). When the door reaches the DOWN limit position, themicrocontroller causes the electric motor to drive the door past theDOWN limit a small distance, say for one or two inches. This causes thedoor to close solidly on the floor.

The operator embodying the present invention provides variable door orgate output speed, i.e., the user can vary the minimum speed at whichthe motor starts and stops the door. This enables the user to overcomedifferences in door installations, i.e. stickiness and resistance tomovement and other varying functional-type forces. The minimum barrierspeeds in the UP and DOWN directions are determined by theuser-configured force settings, which are adjusted using UP and DOWNforce potentiometers. The force potentiometers set the lengths of thepulses to the FETs, which translate to variable speeds. The user gains agreater force output and a higher minimum starting speed to overcomedifferences in door installations, i.e. stickiness and resistance tomovement and other varying functional-type forces speed, withoutaffecting the maximum speed of travel for the door. The user canconfigure the door to start at a speed greater than a default value, say20 percent. This greater start up and slow down speed is transferred tothe linearly variable speed function in that instead of traveling at 20percent speed, increasing to 100 percent speed, then decreasing to 20percent speed, the door may, for instance, travel at 40 percent speed to100 percent speed and back down to 40 percent speed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of a garage having mounted within it agarage door operator embodying the present invention;

FIG. 2 is an exploded perspective view of a head unit of the garage dooroperator shown in FIG. 1;

FIG. 3 is an exploded perspective view of a portion of a transmissionunit of the garage door operator shown in FIG. 1;

FIG. 4 is a block diagram of a controller and motor mounted within thehead unit of the garage door operator shown in FIG. 1;

FIGS. 5A-5D are a schematic diagram of the controller shown in blockformat in FIG. 4;

FIGS. 6A-6B are a flow chart of an overall routine that executes in amicroprocessor of the controller shown in FIGS. 5A-5D;

FIGS. 7A-7H are a flow chart of the main routine executed in themicroprocessor;

FIG. 8 is a flow chart of a set variable light shut-off timer routineexecuted by the microprocessor;

FIGS. 9A-9C are a flow chart of a hardware timer interrupt routineexecuted in the microprocessor;

FIGS. 10A-10C are a flow chart of a 1 millisecond timer routine executedin the microprocessor;

FIGS. 11A-11C are a flow chart of a 125 millisecond timer routineexecuted in the microprocessor;

FIGS. 12A-12B are a flow chart of a 4 millisecond timer routine executedin the microprocessor;

FIGS. 13A-13B are a flow chart of an RPM interrupt routine executed inthe microprocessor;

FIG. 14 is a flow chart of a motor state machine routine executed in themicroprocessor;

FIG. 15 is a flow chart of a stop in midtravel routine executed in themicroprocessor;

FIG. 16 is a flow chart of a DOWN position routine executed in themicroprocessor;

FIGS. 17A-17C are a flow chart of an UP direction routine executed inthe microprocessor;

FIG. 18 is a flow chart of an auto-reverse routine executed in themicroprocessor;

FIG. 19 is a flow chart of an UP position routine executed in themicroprocessor;

FIGS. 20A-20D are a flow chart of the DOWN direction routine executed inthe microprocessor;

FIG. 21 is an exploded perspective view of a pass point detector andmotor of the operator shown in FIG. 2;

FIG. 22A is a plan view of the pass point detector shown in FIG. 21; and

FIG. 22B is a partial plan view of the pass point detector shown in FIG.21.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Referring now to the drawings and especially to FIG. 1, a movablebarrier or garage door operator system is generally shown therein andreferred to by numeral 8. The system 8 includes a movable barrieroperator or garage door operator 10 having a head unit 12 mounted withina garage 14. More specifically, the head unit 12 is mounted to a ceiling15 of the garage 14. The operator 10 includes a transmission 18extending from the head unit 12 with a releasable trolley 20 attached.The releasable trolley 20 releasably connects an arm 22 extending to asingle panel garage door 24 positioned for movement along a pair of doorrails 26 and 28.

The system 8 includes a hand-held RF transmitter unit 30 adapted to sendsignals to an antenna 32 (see FIG. 4) positioned on the head unit 12 andcoupled to a receiver within the head unit 12 as will appearhereinafter. A switch module 39 is mounted on the head unit 12. Switchmodule 39 includes switches for each of the commands available from aremote transmitter or from an optional wall-mounted switch (not shown).Switch module 39 enables an installer to conveniently request thevarious learn modes during installation of the head unit 12. The switchmodule 39 includes a learn switch, a light switch, a lock switch and acommand switch, which are described below. Switch module 39 may alsoinclude terminals for wiring a pedestrian door state sensor comprising apair of contacts 13 and 15 for a pedestrian door 11, as well as wiringfor an optional wall switch (not shown).

The garage door 24 includes the pedestrian door 11. Contact 13 ismounted to door 24 for contact with contact 15 mounted to pedestriandoor 11. Both contacts 13 and 15 are connected via a wire 17 to headunit 12. As will be described further below, when the pedestrian door 11is closed, electrical contact is made between the contacts 13 and 15closing a pedestrian door circuit in the receiver in head unit 12 andsignalling that the pedestriam door state is closed. This circuit mustbe closed before the receiver will permit other portions of the operatorto move the door 24. If circuit is open, indicating that the pedestriandoor state is open, the system will not permit door 24 to move.

The head unit 12 includes a housing comprising four sections: a bottomsection 102, a front section 106, a back section 108 and a top section110, which are held together by screws 112 as shown in FIG. 2. Cover 104fits into front section 106 and provides a cover for a worklight.External AC power is supplied to the operator 10 through a power cord112. The AC power is applied to a step-down transformer 120. An electricmotor 118 is selectively energized by rectified AC power and drives asprocket 125 in sprocket assembly 124. The sprocket 125 drives chain 144(see FIG. 3). A printed circuit board 114 includes a controller 200 andother electronics for operating the head unit 12. A cable 116 providesinput and output connections on signal paths between the printed circuitboard 114 and switch module 39. The transmission 18, as shown in FIG. 3,includes a rail 142 which holds chain 144 within a rail and chainhousing 140 and holds the chain in tension to transfer mechanical energyfrom the motor to the door.

A block diagram of the controller and motor connections is shown in FIG.4. Controller 200 includes an RF receiver 80, a microprocessor 300 andan EEPROM 302. RF receiver 80 of controller 200 receives a command tomove the door and actuate the motor either from remote transmitter 30,which transmits an RF signal which is received by antenna 32, or from auser command switch 250. User command switch 250 can be a switch onswitch panel 39, mounted on the head unit, or a switch from an optionalwall switch. Upon receipt of a door movement command signal from eitherantenna 32 or user switch 250, the controller 200 sends a power enablesignal via line 240 to AC hot connection 206 which provides AC linecurrent to transformer 212 and power to work light 210. Rectified AC isprovided from rectifier 214 via line 236 to relays 232 and 234.Depending on the commanded direction of travel, controller 200 providesa signal to either relay 232 or relay 234. Relays 232 and 234 are usedto control the direction of rotation of motor 118 by controlling thedirection of current flow through the windings. One relay is used forclockwise rotation; the other is used for counterclockwise rotation.

Upon receipt of the door movement command signal, controller 200 sends asignal via line 230 to power-control FET 252. Motor speed is determinedby the duration or length of the pulses in the signal to a gateelectrode of FET 252. The shorter the pulses, the slower the speed. Thiscompletes the circuit between relay 232 and FET 252 providing power tomotor 118 via line 254. If the door had been commanded to move in theopposite direction, relay 234 would have been enabled, completing thecircuit with FET 252 and providing power to motor 118 via line 238.

With power provided, the motor 118 drives the output shaft 216 whichprovides drive power to transmission sprocket 125. Gear reductionhousing 260 includes an internal pass point system which sends a passpoint signal via line 220 to controller 220 whenever the pass point isreached. The pass point signal is provided to controller 200 via currentlimiting resistor 226 to protect controller 200 from electrostaticdischarge (ESD). An RPM interrupt signal is provided via line 224, viacurrent limiting resistor 228, to controller 200. Lead 222 provides aplus five volts supply for the Hall effect sensors in the RPM module.Commanded force is input by two force potentiometers 202, 204. Forcepotentiometer 202 is used to set the commanded force for UP travel;force potentiometer 204 is used to set the commanded force for DOWNtravel. Force potentiometers 202 and 204 provide commanded inputs tocontroller 200 which are used to adjust the length of the pulsed signalprovided to FET 252.

The pass point for this system is provided internally in the motor 118.Referring to FIG. 22, the pass point module 40 is attached to gearreduction housing 260 of motor 118. Pass point module 40 includes upperplate 42 which covers the three internal gears and switch within lowerhousing 50. Lower housing 50 includes recess 62 having two pins 61 whichposition switch assembly 52 in recess 62. Housing 50 also includes threecutouts which are sized to support and provide for rotation of the threegeared elements. Outer gear 44 fits rotatably within cutout 64. Outergear includes a smooth outer surface for rotating within housing 50 andinner gear teeth for rotating middle gear 46. Middle gear 46 fitsrotatably within inner cutout 66. Middle gear 46 includes a smooth outersurface and a raised portion with gear teeth for being driven by thegear teeth of outer ring gear 44. Inner gear 48 fits within middle gear46 and is driven by an extension of shaft 216. Rotation of the motor 118causes shaft 216 to rotate and drive inner gear 48.

Outer gear 44 includes a notch 74 in the outer periphery. Middle gearincludes a notch 76 in the outer periphery. Referring to FIG. 22A,rotation of inner gear 48 rotates middle gear 46 in the same direction.Rotation of middle gear 46 rotates outer gear 44 in the same direction.Gears 46 and 44 are sized such that pass point indications comprisingswitch release cutouts 74 and 76 line up only once during the entiretravel distance of the door. As seen in FIG. 22A, when switch releasecutouts 74 and 76 line up, switch 72 is open generating a pass pointpresence signal. The location where switch release cutouts 74 and 76line up is the pass point. At all other times, at least one of the twogears holds switch 72 closed generating a signal indicating that thepass point has not been reached.

The receiver portion 80 of controller 200 is shown in FIG. 5A. RFsignals may be received by the controller 200 at the antenna 32 and fedto the receiver 80. The receiver 80 includes variable inductor L1 and apair of capacitors C2 and C3 that provide impedance matching between theantenna 32 and other portions of the receiver. An NPN transistor Q4 isconnected in common-base configuration as a buffer amplifier. Bias tothe buffer amplifier transistor Q4 is provided by resistors R2, R3. Thebuffered RF output signal is supplied to a second NPN transistor Q5. Theradio frequency signal is coupled to a bandpass amplifier 280 to anaverage detector 282 which feeds a comparator 284. Referring to FIGS. 5Cand 5B, the analog output signal A, B is applied to noise reductioncapacitors C19, C20 and C21 then provided to pins P32 and P33 of themicrocontroller 300. Microcontroller 300 may be a Z86733 microprocessor.

An external transformer 212 receives AC power from a source such as autility and steps down the AC voltage to the power supply 90 circuit ofcontroller 200. Transformer 212 provides AC current to full-wave bridgecircuit 214, which produces a 28 volt full wave rectified signal acrosscapacitor C35. The AC power may have a frequency of 50 Hz or 60 Hz. Anexternal transformer is especially important when motor 118 is a DCmotor. The 28 volt rectified signal is used to drive a wall controlswitch, a obstacle detector circuit, a door-in-door switch and to powerFETs Q11 and Q12 used to start the motor. Zener diode D18 protectsagainst overvoltage due to the pulsed current, in particular, from theFETs rapidly switching off inductive load of the motor. The potential ofthe full-wave rectified signal is further reduced to provide 5 volts atcapacitor C38, which is used to power the microprocessor 300, thereceiver circuit 80 and other logic functions.

The 28 volt rectified power supply signal indicated by reference numeralT in FIG. 5C is voltage divided down by resistors R61 and R62, thenapplied to an input pin P24 of microprocessor 300. This signal is usedto provide the phase of the power line current to microprocessor 300.Microprocessor 300 constantly checks for the phase of the line voltagein order to determine if the frequency of the line voltage is 50 Hz or60 Hz. This information is used to establish the worklight time-outperiod and to select the look-up table stored in the ROM in themicrocontroller for converting pulse width to door speed.

When the door is commanded to move, either through a signal from aremote transmitter received through antenna 32 and processed by receiver80, or through an optional wall switch, the microprocessor 300 commandsthe work light to turn on. Microprocessor 300 sends a worklight enablesignal from pin P07. The worklight enable signal is applied to the baseof transistor Q3, which drives relay K3. AC power from a signal Uprovides power for operating the worklight 210.

Microprocessor 300 reads from and writes data to an EEPROM 302 via itspins P25, P26 and P27. EEPROM 302 may be a 93C46. Microprocessor 300provides a light enable signal at pin P21 which is used to enable alearn mode indicator yellow LED D15. LED D15 is enabled or lit when thereceiver is in the learn mode. Pin P26 provides double duty. When theuser selects switch S1, a learn enable signal is provided to bothmicroprocessor 300 and EEPROM 302. Switch S1 is mounted on the head unit12 and is part of switch module 39, which is used by the installer tooperate the system.

An optional flasher module provides an additional level of safety forusers and is controlled by microprocessor 300 at pin P22. The optionalflasher module is connected between terminals 308 and 310. In theoptional flasher module, after receipt of a door command, themicroprocessor 300 sends a signal from P22 which causes the flasherlight to blink for 2 seconds. The door does not move during that 2second period, giving the user notice that the door has been commandedto move and will start to move in 2 seconds. After expiration of the 2second period, the door moves and the flasher light module blinks duringthe entire period of door movement. If the operator does not have aflasher module installed in the head unit, when the door is commanded tomove, there is no time delay before the door begins to move.

Microprocessor 300 provides the signals which start motor 116, controlits direction of rotation (and thus the direction of movement of thedoor) and the speed of rotation (speed of door travel). FETs Q11 and Q12are used to start motor 118. Microprocessor 300 applies a pulsed outputsignal to the gates of FETs Q11 and Q12. The lengths of the pulsesdetermine the time the FETs conduct and thus the amount of time currentis applied to start and run the motor 118. The longer the pulse, thelonger current is applied, the greater the speed of rotation the motor118 will develop. Diode D11 is coupled between the 28 volt power supplyand is used to clean up flyback voltage to the input bridge D4 when theFETs are conducting. Similarly, Zener diode D19 (see FIG. 5A) is used toprotect against overvoltage when the FETs are conducting.

Control of the direction of rotation of motor 118 (and thus direction oftravel of the door) is accomplished with two relays, K1 and K2. Relay K1supplies current to cause the motor to rotate clockwise in an openingdirection (door moves UP); relay K2 supplies current to cause the motorto rotate counterclockwise in a closing direction (door moves DOWN).When the door is commanded to move UP, the microprocessor 300 sends anenable signal from pin P05 to the base of transistor Q1, which drivesrelay K1. When the door is commanded to move DOWN, the microprocessor300 sends an enable signal from pin P06 to the base of transistor Q2,which drives relay K2.

Door-in-door contacts 13 and 15 are connected to terminals 304 and 306.Terminals 304 and 306 are connected to relays K1 and K2. If the signalbetween contacts 13 and 15 is broken, the signal across terminals 304and 306 is open, preventing relays K1 and K2 from energizing. The motor118 will not rotate and the door 24 will not move until the user closespedestrian door 11, making contact between contacts 13 and 15.

The pass point signal 220 from the pass point module 40 (see FIG. 21) ofmotor 118 is applied to pin P23 of microprocessor 300. The RPM signal224 from the RPM sensor module in motor 118 is applied to pin P31 ofmicroprocessor 300. Application of the pass point signal and the RPMsignal is described with reference to the flow charts.

An optional wall control, which duplicates the switches on remotetransmitter 30, may be connected to controller 200 at terminals 312 and314. When the user presses the door command switch 39, a dead short ismade to ground, which the microprocessor 300 detects by the failure todetect voltage. Capacitor C22 is provided for RF noise reduction. Thedead short to ground is sensed at pins P02 and P03, for redundancy.

Switches S1 and S2 are part of switch module 39 mounted on head unit 12and used by the installer for operating the system. As stated above, S1is the learn switch. S2 is the door command switch. When S2 is pressed,microprocessor 300 detects the dead short at pins P02 and P03.

Input from an obstacle detector (not shown) is provided at terminal 316.This signal is voltage divided down and provided to microprocessor 300at pins P20 and P30, for redundancy. Except when the door is moving andless than an inch above the floor, when the obstacle detector senses anobject in the doorway, the microprocessor executes the auto-reverseroutine causing the door to stop and/or reverse depending on the stateof the door movement.

Force and speed of door travel are determined by two potentiometers.Potentiometer R33 adjusts the force and speed of UP travel;potentiometer R34 adjusts the force and speed of DOWN travel.Potentiometers R33 and R34 act as analog voltage dividers. The analogsignal from R33, R34 is further divided down by voltage divider R35/R37,R36/R38 before it is applied to the input of comparators 320 and 322.Reference pulses from pins P34 and P35 of microprocessor 300 arecompared with the force input from potentiometers R33 and R34 incomparators 320 and 322. The output of comparators 320 and 322 isapplied to pins P01 and P00.

To perform the A/D conversion, the microprocessor 300 samples the outputof the comparators 320 and 322 at pins P00 and P01 to determine whichvoltage is higher: the voltage from the potentiometer R33 or R34 (IN) orthe voltage from the reference pin P34 or P35 (REF). If thepotentiometer voltage is higher than the reference, then themicroprocessor outputs a pulse. If not, the output voltage is held low.The RC filter (R39, C29/R40, C30) converts the pulses into a DC voltageequivalent to the duty cycle of the pulses. By outputting the pulses inthe manner described above, the microprocessor creates a voltage at REFwhich dithers around the voltage at IN. The microprocessor thencalculates the duty cycle of the pulse output which directly correlatesto the voltage seen at IN.

When power is applied to the head unit 12 including controller 200,microprocessor 300 executes a series of routines. With power applied,microprocessor 300 executes the main routines shown in FIGS. 6A and 6B.The main loop 400 includes three basic functions, which are loopedcontinuously until power is removed. In block 402 the microprocessor 300handles all non-radio EEPROM communications and disables radio access tothe EEPROM 302 when communicating. This ensures that during normaloperation, i.e., when the garage door operator is not being programmed,the remote transmitter does not have access to the EEPROM, wheretransmitter codes are stored. Radio transmissions are processed uponreceipt of a radio interrupt (see below).

In block 404, microprocessor 300 maintains all low priority tasks, suchas calculating new force levels and minimum speed. Preferably, a set ofredundant RAM registers is provided. In the event of an unforeseen event(e.g., an ESD event) which corrupts regular RAM, the main RAM registersand the redundant RAM registers will not match. Thus, when the values inRAM do not match, the routine knows the regular RAM has been corrupted.(See block 504 below.) In block 406, microprocessor 300 tests redundantRAM registers. Several interrupt routines can take priority over blocks402, 404 and 406.

The infrared obstacle detector generates an asynchronous IR interruptsignal which is a series of pulses. The absence of the obstacle detectorpulses indicates an obstruction in the beam. After processing the IRinterrupt, microprocessor 300 sets the status of the obstacle detectoras unobstructed at block 416.

Receipt of a transmission from remote transmitter 30 generates anasynchronous radio interrupt at block 410. At block 418, if in the doorcommand mode, microprocessor 300 parses incoming radio signals and setsa flag if the signal matches a stored code. If in the learn mode,microprocessor 300 stores the new transmitter codes in the EEPROM.

An asynchronous interrupt is generated if a remote communications unitis connected to an optional RS-232 communications port located on thehead unit. Upon receipt of the hardware interrupt, microprocessor 300executes a serial data communications routine for transferring andstoring data from the remote hardware.

Hardware timer 0 interrupt is shown in block 422. In block 422,microprocessor 300 reads the incoming AC line signal from pin P24 andhandles the motor phase control output. The incoming line signal is usedto determine if the line voltage is 50 Hz for the foreign market or 60Hz for the domestic market. With each interrupt, microprocessor 300, atblock 426, task switches among three tasks. In block 428, microprocessor300 updates software timers. In block 430, microprocessor 300 debounceswall control switch signals. In block 432, microprocessor 300 controlsthe motor state, including motor direction relay outputs and motorsafety systems.

When the motor 118 is running, it generates an asynchronous RPMinterrupt at block 434. When microprocessor 300 receives theasynchronous RPM interrupt at pin P31, it calculates the motor RPMperiod at block 436, then updates the position of the door at block 438.

Further details of main loop 400 are shown in FIGS. 7A through 7H. Thefirst step executed in main loop 400 is block 450, where themicroprocessor checks to see if the pass point has been passed since thelast update. If it has, the routine branches to block 452, where themicroprocessor 300 updates the position of the door relative to the passpoint in EEPROM 302 or non-volatile memory. The routine then continuesat block 454. An optional safety feature of the garage door operatorsystem enables the worklight, when the door is open and stopped and theinfrared beam in the obstacle detector is broken.

At block 454, the microprocessor checks if the enable/disable of theworklight for this feature has been changed. Some users want the addedsafety feature; others prefer to save the electricity used. If new inputhas been provided, the routine branches to block 456 and sets the statusof the obstacle detector-controlled worklight in non-volatile memory inaccordance with the new input. Then the routine continues to block 458where the routine checks to determine if the worklight has been turnedon without the timer. A separate switch is provided on both the remotetransmitter 30 and the head unit at module 39 to enable the user toswitch on the worklight without operating the door command switch. Ifno, the routine skips to block 470.

If yes, the routine checks at block 460 to see if the one-shot flag hasbeen set for an obstacle detector beam break. If no, the routine skipsto block 470. If yes, the routine checks if the obstacle detectorcontrolled worklight is enabled at block 462. If not, the routine skipsto block 470. If it is, the routine checks if the door is stopped in thefully open position at block 464. If no, the routine skips to block 470.If yes, the routine calls the SetVarLight subroutine (see FIG. 8) toenable the appropriate turn off time (4.5 minutes for 60 Hz systems or2.5 minutes for 50 Hz systems). At block 468, the routine turns on theworklight.

At block 470, the microprocessor 300 clears the one-shot flag for theinfrared beam break. This resets the obstacle detector, so that a laterbeam break can generate an interrupt. At block 472, if the user hasinstalled a temporary password usable for a fixed period of time, themicroprocessor 300 updates the non-volatile timer for the radiotemporary password. At block 474, the microprocessor 300 refreshes theRAM registers for radio mode from non-volatile memory (EEPROM 302). Atblock 476, the microprocessor 300 refreshes I/O port directions, i.e.,whether each of the ports is to be input or output. At block 478, themicroprocessor 300 updates the status of the radio lockout flag, ifnecessary. The radio lockout flag prevents the microprocessor fromresponding to a signal from a remote transmitter. A radio interrupt(described below) will disable the radio lockout flag and enable theremote transmitter to communicate with the receiver.

At block 480, the microprocessor 300 checks if the door is about totravel. If not, the routine skips to block 502. If the door is about totravel, the microprocessor 300 checks if the limits are being trained atblock 482. If they are, the routine skips to block 502. If not, theroutine asks at block 484 if travel is UP or DOWN. If DOWN, the routinerefreshes the DOWN limit from non-volatile memory (EEPROM 302) at block486. If UP, the routine refreshes the UP limit from non-volatile memory(EEPROM 302) at block 488. The routine updates the current operatingstate and position relative to the pass point in non-volatile memory atblock 490. This is a redundant read for stability of the system.

At block 492, the routine checks for completion of a limit trainingcycle. If training is complete, the routine branches to block 494 wherethe new limit settings and position relative to the pass point arewritten to non-volatile memory.

The routine then updates the counter for the number of operating cyclesat block 496. This information can be downloaded at a later time andused to determine when certain parts need to be replaced. At block 498the routine checks if the number of cycles is a multiple of 256.Limiting the storage of this information to multiples of 256 limits thenumber of times the system has to write to that register. If yes itupdates the history of force settings at block 500. If not, the routinecontinues to block 502.

At block 502 the routine updates the learn switch debouncer. At block504 the routine performs a continuity check by comparing the backup(redundant) RAM registers with the main registers. If they do not match,the routine branches to block 506. If the registers do not match, theRAM memory has been corrupted and the system is not safe to operate, soa reset is commanded. At this point, the system powers up as if powerhad been removed and reapplied and the first step is a self test of thesystem (all installation settings are unchanged).

If the answer to block 504 is yes, the routine continues to block 508where the routine services any incoming serial messages from theoptional wall control (serial messages might be user input start or stopcommands). The routine then loads the UP force timing from the ROMlook-up table, using the user setting as an index at block 510. Forcepotentiometers R33 and R34 are set by the user. The analog values set bythe user are converted to digital values. The digital values are used asan index to the look-up table stored in memory. The value indexed fromthe look-up table is then used as the minimum motor speed measurement.When the motor runs, the routine compares the selected value from thelook-up table with the digital timing from the RPM routine to ensure theforce is acceptable.

Instead of calculating the force each time the force potentiometers areset, a look-up table is provided for each potentiometer. The range ofvalues based on the range of user inputs is stored in ROM and used tosave microprocessor processing time. The system includes two forcelimits: one for the UP force and one for the DOWN force. Two forcelimits provide a safer system. A heavy door may require more UP force tolift, but need a lower DOWN force setting (and therefore a slowerclosing speed) to provide a soft closure. A light door will need less UPforce to open the door and possibly a greater DOWN force to provide afull closure.

Next the force timing is divided by power level of the motor for thedoor to scale the maximum force timeout at block 512. This step scalesthe force reversal point based on the maximum force for the door. Themaximum force for the door is determined based on the size of the door,i.e. the distance the door travels. Single piece doors travel a greaterdistance than segmented doors. Short doors require less force to movethan normal doors. The maximum force for a short door is scaled down to60 percent of the maximum force available for a normal door. So, atblock 512, if the force setting is set by the user, for example at 40percent, and the door is a normal door (i.e., a segmented door ormulti-paneled door), the force is scaled to 40 percent of 100 percent.If the door is a short door (i.e., a single panel door), the force isscaled to 40 percent of 60 percent, or 24 percent.

At block 514, the routine loads the DOWN force timing from the ROMlook-up table, using the user setting as an index. At block 516, theroutine divides the force timing by the power level of the motor for thedoor to scale the force to the speed.

At block 518 the routine checks if the door is traveling DOWN. If yes,the routine disables use of the MinSpeed Register at block 524 and loadsthe MinSpeed Register with the DOWN force setting, i.e., the value readfrom the DOWN force potentiometer at block 526. If not, the routinedisables use of the MinSpeed Register at block 520 and loads theMinSpeed Register with the UP force setting from the force potentiometerat block 522.

The routine continues at block 528 where the routine subtracts 20 fromthe MinSpeed value. The MinSpeed value ranges from 0 to 63. The systemuses 64 levels of force. If the result is negative at block 530, theroutine clears the MinSpeed Register at block 532 to effectivelytruncate the lower 38 percent of the force settings. If no, the routinedivides the minimum speed by 4 to scale 8 speeds to 32 force settings atblock 534. At block 536, the routine adds 4 into the minimum speed tocorrect the offset, and clips the result to a maximum of 12. At block538 the routine enables use of the MinSpeed Register.

At block 540 the routine checks if the period of the rectified AC linesignal (input to microprocessor 300 at pin P24) is less than 9milliseconds (indicating the line frequency is 60 Hz). If it is, theroutine skips to block 548. If not, the routine checks if the lightshut-off timer is active at block 542. If not, the routine skips toblock 548. If yes, the routine checks if the light time value is greaterthan 2.5 minutes at block 544. If no, the routine skips to block 548. Ifyes, the routine calls the SetVarLight subroutine (see FIG. 8), tocorrect the light timing setting, at block 546.

At block 548 the routine checks if the radio signal has been clear for100 milliseconds or more. If not, the routine skips to block 552. Ifyes, the routine clears the radio at block 550. At block 552, theroutine resets the watchdog timer. At block 554, the routine loops tothe beginning of the main loop.

The SetVarLight subroutine, FIG. 8, is called whenever the door iscommanded to move and the worklight is to be turned on. When theSetVarLight subroutine, block 558 is called, the subroutine checks ifthe period of the rectified power line signal (pin P24 of microprocessor300) is greater than or equal to 9 milliseconds. If yes, the linefrequency is 50 Hz, and the timer is set to 2.5 minutes at block 564. Ifno, the line frequency is 60 Hz and the timer is set to 4.5 minutes atblock 562. After setting, the subroutine returns to the call point atblock 566.

The hardware timer interrupt subroutine operated by microprocessor 300,shown at block 422, runs every 0.256 milliseconds. Referring to FIGS.9A-9C, when the subroutine is first called, it sets the radio interruptstatus as indicated by the software flags at block 580. At block 582,the subroutine updates the software timer extension. The next series ofsteps monitor the AC power line frequency (pin P24 of microprocessor300). At step 584, the subroutine checks if the rectified power lineinput is high (checks for a leading edge). If yes, the subroutine skipsto block 594, where it increments the power line high time counter, thencontinues to block 596. If no, the subroutine checks if the high timecounter is below 2 milliseconds at block 586. If yes, the subroutineskips to block 594. If no, the subroutine sets the measured power linetime in RAM at block 588. The subroutine then resets the power line hightime counter at block 590 and resets the phase timer register in block592.

At block 596, the subroutine checks if the motor power level is set at100 percent. If yes, the subroutine turns on the motor phase controloutput at block 606. If no, the subroutine checks if the motor powerlevel is set at 0 percent at block 598. If yes, the subroutine turns offthe motor phase control output at block 604. If no, the phase timerregister is decremented at block 600 and the result is checked for sign.If positive the subroutine branches to block 606; if negative thesubroutine branches to block 604.

The subroutine continues at block 608 where the incoming RPM signal (atpin P31 of microprocessor 300) is digitally filtered. Then the timeprescaling task switcher (which loops through 8 tasks identified atblocks 620, 630, 640, 650) is incremented at block 610. The taskswitcher varies from 0 to 7. At block 612, the subroutine branches tothe proper task depending on the value of the task switcher.

If the task switcher is at value 2 (this occurs every 4 milliseconds),the execute motor state machine subroutine is called at block 620. Ifthe task is value 0 or 4 (this occurs every 2 milliseconds), the wallcontrol switches are debounced at block 630. If the task value is 6(this occurs every 4 milliseconds), the execute 4 ms timer subroutine iscalled at block 640. If the task is value 1, 3, 5 or 7, the 1millisecond timer subroutine is called at block 650. Upon completion ofthe called subroutine, the 0.256 millisecond timer subroutine returns atblock 614.

Details of the 1 ms timer subroutine (block 650) are shown in FIGS.10A-10C. When this subroutine is called, the first step is to update theA/D converters on the UP and DOWN force setting potentiometers (P34 andP35 of microprocessor 300) at block 652. At block 654, the subroutinechecks if the A/D conversion (comparison at comparators 320 and 322) iscomplete. If yes, the measured potentiometer values are stored at block656. Then the stored values (which vary from 0 to 127) are divided by 2to obtain the 64 level force setting at block 658. If no, the subroutinedecrements the infrared obstacle detector timeout timer at block 660. Inblock 662, the subroutine checks if the timer has reached zero. If no,the subroutine skips to block 672. If yes, the subroutine resets theinfrared obstacle detector timeout timer at block 664. The flag settingfor the obstacle detector signal is checked at block 666. If no, theone-shot break flag is set at block 668. If yes, the flag is setindicating the obstacle detector signal is absent at block 670.

At block 672, the subroutine increments the radio time out register.Then the infrared obstacle detector reversal timer is decremented atblock 674. The pass point input is debounced at block 676. The 125millisecond prescaler is incremented at block 678. Then the prescaler ischecked if it has reached 63 milliseconds at block 680. If yes, thefault blinking LED is updated at block 682. If no, the prescaler ischecked if it has reached 125 ms at block 684. If yes, the 125 ms timersubroutine is executed at block 686. If no, the routine returns at block688.

The 125 millisecond timer subroutine (block 690) is used to manage thepower level of the motor 118. At block 692, the subroutine updates theRS-232 mode timer and exits the RS-232 mode timer if necessary. The samepair of wires is used for both wall control switches and RS-232communication. If RS-232 communication is received while in the wallcontrol mode, the RS-232 mode is entered. If four seconds passes sincethe last RS-232 word was received, then the RS-232 timer times out andreverts to the wall control mode. At block 694 the subroutine checks ifthe motor is set to be stopped. If yes, the subroutine skips to block716 and sets the motor's power level to 0 percent. If no, the subroutinechecks if the pre-travel safety light is flashing at block 696 (if theoptional flasher module has been installed, a light will flash for 2seconds before the motor is permitted to travel and then flash at apredetermined interval during motor travel). If yes, the subroutineskips to block 716 and sets the motor's power level to 0 percent.

If no, the subroutine checks if the microprocessor 300 is in the lastphase of a limit training mode at block 698. If yes, the subroutineskips to block 710. If no, the subroutine checks if the microprocessor300 is in another part of the limit training mode at block 700. If no,the subroutine skips to block 710. If yes, the subroutine checks if theminimum speed (as determined by the force settings) is greater than 40percent at block 704. If no, the power level is set to 40 percent atblock 708. If yes, the power level is set equal to the minimum speedstored in MinSpeed Register at block 706.

At block 710 the subroutine checks if the flag is set to slow down. Ifyes, the subroutine checks if the motor is running above or belowminimum speed at block 714. If above minimum speed, the power level ofthe motor is decremented one step increment (one step increment ispreferably 5% of maximum motor speed) at block 722. If below the minimumspeed, the power level of the motor is incremented one step increment(which is preferably 5% of maximum motor speed) to minimum speed atblock 720.

If the flag is not set to slow down at block 710, the subroutine checksif the motor is running at maximum allowable speed at block 712. If no,the power level of the motor is incremented one step increment (which ispreferably 5% of maximum motor speed) at block 720. If yes, the flag isset for motor ramp-up speed complete.

The subroutine continues at block 724 where it checks if the period ofthe rectified AC power line (pin P24 of microprocessor 300) is greaterthan or equal to 9 ms. If no, the subroutine fetches the motor's phasecontrol information (indexed from the power level) from the 60 Hzlook-up table stored in ROM at block 728. If yes, the subroutine fetchesthe motor's phase control information (indexed from the power level)from the 50 Hz look-up table stored in ROM at block 726.

The subroutine tests for a user enable/disable of the infrared obstacledetector-controlled worklight feature at block 730. Then the user radiolearning timers, ZZWIN (at the wall keypad if installed) and AUXLEARNSW(radio on air and worklight command) are updated at block 732. Thesoftware watchdog timer is updated at block 734 and the fault blinkingLED is updated at block 736. The subroutine returns at block 738.

The 4 millisecond timer subroutine is used to check on various systemswhich do not require updating as often as more critical systems.Referring to FIGS. 12A and 12B, the subroutine is called at block 640.At block 750, the RPM safety timers are updated. These timers are usedto determine if the door has engaged the floor. The RPM safety timer isa one second delay before the operator begins to look for a fallingdoor, i.e., one second after stopping. There are two different forcesused in the garage door operator. The first type force are the forcesdetermined by the UP and DOWN force potentiometers. These force levelsdetermine the speed at which the door travels in the UP and DOWNdirections. The second type of force is determined by the decrease inmotor speed due to an external force being applied to the door (anobstacle or the floor). This programmed or pre-selected external forceis the maximum force that the system will accept before an auto-reverseor stop is commanded.

At block 752 the 0.5 second RPM timer is checked to see if it hasexpired. If yes, the 0.5 second timer is reset at block 754. At block756 safety checks are performed on the RPM seen during the last 0.5seconds to prevent the door from falling. The 0.5 second timer is chosenso the maximum force achieved at the trolley will reach 50 kilograms in0.5 seconds if the motor is operating at 100 percent of power.

At block 758, the subroutine updates the 1 second timer for the optionallight flasher module. In this embodiment, the preferred flash period is1 second. At block 760 the radio dead time and dropout timers areupdated. At block 762 the learn switch is debounced. At block 764 thestatus of the worklight is updated in accordance with the various lighttimers. At block 766 the optional wall control blink timer is updated.The optional wall control includes a light which blinks when the door isbeing commanded to auto-reverse in response to an infrared obstacledetector signal break. At block 768 the subroutine returns.

Further details of the asynchronous RPM signal interrupt, block 434, areshown in FIGS. 13A and 13B. This signal, which is provided tomicroprocessor 300 at pin P31, is used to control the motor speed andthe position detector. Door position is determined by a value relativeto the pass point. The pass point is set at 0. Positions above the passpoint are negative; positions below the pass point are positive. Whenthe door travels to the UP limit, the position detector (or counter)determines the position based on the number of RPM pulses to the UPlimit number. When the door travels DOWN to the DOWN limit, the positiondetector counts the number of RPM pulses to the DOWN limit number. TheUP and DOWN limit numbers are stored in a register.

At block 782 the RPM interrupt subroutine calculates the period of theincoming RPM signal. If the door is traveling UP, the subroutinecalculates the difference between two successive pulses. If the door istraveling DOWN, the subroutine calculates the difference between twosuccessive pulses. At block 784, the subroutine divides the period by 8to fit into a binary word. At block 786 the subroutine checks if themotor speed is ramping up. This is the max force mode. RPM timeout willvary from 10 to 500 milliseconds. Note that these times are recommendedfor a DC motor. If an AC motor is used, the maximum time would be scaleddown to typically 24 milliseconds. A 24 millisecond period is slowerthan the breakdown RPM of the motor and therefore beyond the maximumpossible force of most preferred motors. If yes, the RPM timeout is setat 500 milliseconds (0.5 seconds) at block 790. If no, the subroutinesets the RPM timeout as the rounded-up value of the force setting inblock 788.

At block 792 the subroutine checks for the direction of travel. This isfound in the state machine register. If the door is traveling DOWN, theposition counter is incremented at block 796 and the pass pointdebouncer is sampled at block 800. At block 804, the subroutine checksfor the falling edge of the pass point signal. If the falling edge ispresent, the subroutine returns at block 814. If there is a pass pointfalling edge, the subroutine checks for the lowest pass point (in caseswhere more than one pass point is used). If this is not the lowest passpoint, the subroutine returns at block 814. If it is the only pass pointor the lowest pass point, the position counter is zeroed and thesubroutine returns at block 814.

If the door is traveling UP, the subroutine decrements the positioncounter at block 794 and samples the pass point debouncer at block 798.Then it checks for the rising edge of the pass point signal at block802. If there is no pass point signal rising edge, the subroutinereturns at block 814. If there is, it checks for the lowest pass pointat block 806. If no the subroutine returns at block 814. If yes, thesubroutine zeroes the position counter and returns at block 814.

The motor state machine subroutine, block 620, is shown in FIG. 14. Itkeeps track of the state of the motor. At block 820, the subroutineupdates the false obstacle detector signal output, which is used insystems that do not require an infrared obstacle detector. At block 822,the subroutine checks if the software watchdog timer has reached toohigh a value. If yes, a system reset is commanded at block 824. If no,at block 826, it checks the state of the motor stored in the motor stateregister located in EEPROM 302 and executes the appropriate subroutine.

If the door is traveling UP, the UP direction subroutine at block 832 isexecuted. If the door is traveling DOWN, the DOWN direction subroutineis executed at block 828. If the door is stopped in the middle of thetravel path, the stop in midtravel subroutine is executed at block 838.If the door is fully closed, the DOWN position subroutine is executed atblock 830. If the door is fully open, the UP position subroutine isexecuted at block 834. If the door is reversing, the auto-reversesubroutine is executed at block 836.

When the door is stopped in midtravel, the subroutine at block 838 iscalled, as shown in FIG. 15. In block 840 the subroutine updates therelay safety system (ensuring that relays K1 and K2 are open). Thesubroutine checks for a received wall command or radio command. If thereis no received command, the subroutine updates the worklight status andreturns. If yes, the motor power is set to 20 percent at block 844 andthe motor state is set to traveling DOWN at block 846. The worklightstatus is updated and the subroutine returns at block 850. If the dooris stopped in midtravel and a door command is received, the door is setto close. The next time the system calls the motor state machinesubroutine, the motor state machine will call the DOWN directionsubroutine. The door must close to the DOWN limit before it can beopened to the full UP limit.

If the state machine indicates the door is in the DOWN position (i.e.the DOWN limit position), the DOWN position subroutine, block 830, atFIG. 16 is called. When the door is in the DOWN position, the subroutinechecks if a wall control or radio command has been received. If no, thesubroutine updates the light and returns at block 858. If yes, the motorpower is set to 20 percent at block 854 and the motor state register isset to show the state is traveling UP at block 856. The subroutine thenupdates the light and returns at block 858.

The UP direction subroutine, block 832, is shown in FIGS. 17A-17C. Atblock 860 the subroutine waits until the main loop refreshes the UPlimit from EEPROM 302. Then it checks if 40 milliseconds have passedsince closing of the light relay K3 at block 862. If not, the subroutinereturns. If yes, the subroutine checks for flashing the warning lightprior to travel at block 866 (only if the optional flasher module isinstalled). If the light is flashing, the status of the blinking lightis updated and the subroutine returns at block 868. If not, the flashingis terminated, the motor UP relay is turned on at block 870. Then thesubroutine waits until 1 second has passed after the motor was turned onat block 872. If no, the subroutine skips to block 888. If yes, thesubroutine checks for the RPM signal timeout. If no, the subroutinechecks if the motor speed is ramping up at block 876 by checking thevalue of the RAMPFLAG register in RAM (i.e., UP, DOWN, FULLSPEED, STOP).If yes, the subroutine skips to block 888. If no, the subroutine checksif the measured RPM is longer than the allowable RPM period at block878. If no, the subroutine continues at block 888.

If the RPM signal has timed out at block 874 or the measured time periodis longer than allowable at block 878, the subroutine branches to block880. At block 880, the reason is set as force obstruction. At block 882,if the training limits are being set, the training status is updated. Atblock 884 the motor power is set to zero and the state is set as stoppedin midtravel. At block 886 the subroutine returns.

At block 888 the subroutine checks if the door's exact position isknown. If it is not, the door's distance from the UP limit is updated inblock 890 by subtracting the UP limit stored in RAM from the position ofthe door also stored in RAM. Then the subroutine checks at block 892 ifthe door is beyond its UP limit. If yes, the subroutine sets the reasonas reaching the limit in block 894. Then the subroutine checks if thelimits are being trained. If yes, the limit training machine is updatedat block 898. If no, the motor's power is set as zero and the motorstate is set at the UP position in block 900. Then the subroutinereturns at block 902.

If the door is not beyond its UP limit, the subroutine checks if thedoor is being manually positioned in the training cycle at block 904. Ifnot, the door position within the slowdown distance of the limit ischecked at block 906. If yes, the motor slow down flag is set at block910. If the door is being positioned manually at block 904 or the dooris not within the slow down distance, the subroutine skips to block 912.At block 912 the subroutine checks if a wall control or radio commandhas been received. If yes, the motor power is set at zero and the stateis set at stopped in midtravel at block 916. If no, the system checks ifthe motor has been running for over 27 seconds at block 914. If yes, themotor power is set at zero and the motor state is set at stopped inmidtravel at block 916. Then the subroutine returns at block 918.

Referring to FIG. 18, the auto-reverse subroutine block 836 isdescribed. (Force reversal is stopping the motor for 0.5 seconds, thentraveling UP.) At block 920 the subroutine updates the 0.5 secondreversal timer (the force reversal timer described above). Then thesubroutine checks at block 922 for expiration of the force-reversaltimer. If yes, the motor power is set to 20 percent at block 924 and themotor state is set to traveling UP at block 926 and the subroutinereturns at block 932. If the timer has not expired, the subroutinechecks for receipt of a wall command or radio command at block 928. Ifyes, the motor power is set to zero and the state is set at stopped inmidtravel at block 930, then the subroutine returns at block 932. If no,the subroutine returns at block 932.

The UP position routine, block 834, is shown in FIG. 19. Door travellimits training is started with the door in the UP position. At block934, the subroutine updates the relay safety system. Then the subroutinechecks for receipt of a wall command or radio command at block 936indicating an intervening user command. If yes, the motor power is setto 20 percent at block 938 and the state is set at traveling DOWN inblock 940. Then the light is updated and the subroutine returns at block950. If no wall command has been received, the subroutine checks fortraining the limits at block 942. If no, the light is updated and thesubroutine returns at block 950. If yes, the limit training statemachine is updated at block 944. Then the subroutine checks if it istime to travel DOWN at block 946. If no, the subroutine updates thelight and returns at block 950. If it is time to travel DOWN, the stateis set at traveling DOWN at block 948 and the system returns at block950.

The DOWN direction subroutine, block 828, is shown in FIGS. 20A-20D. Atblock 952, the subroutine waits until the main loop routine refreshesthe DOWN limit from EEPROM 302. For safety purposes, only the main loopor the remote transmitter (radio) can access data stored in or writtento the EEPROM 302. Because EEPROM communication is handled withinsoftware, it is necessary to ensure that two software routines do nottry to communicate with the EEPROM at the same time (and have a datacollision). Therefore, EEPROM communication is allowed only in the MainLoop and in the Radio routine, with the Main loop having a busy flag toprevent the radio from communicating with the EEPROM at the same time.At block 954, the subroutine checks if 40 milliseconds has passed sinceclosing of the light relay K3. If no, the subroutine returns at block956. If yes, the subroutine checks if the warning light is flashing (for2 seconds if the optional flasher module is installed) prior to travelat block 958. If yes, the subroutine updates the status of the flashinglight and returns at block 960. If no, or the flashing is completed, thesubroutine turns on the DOWN motor relay K2 at block 962. At block 964the subroutine checks if one second has passed since the motor is firstturned on. The system ignores the force on the motor for the first onesecond. This allows the motor time to overcome the inertia of the door(and exceed the programmed force settings) without having to adjust theprogrammed force settings for ramp up, normal travel and slow down.Force is effectively set to maximum during ramp up to overcome stickydoors.

If the one second time has not passed, the subroutine skips to block984. If the one second time limit has passed, the subroutine checks forthe RPM signal time out at block 966. If no, the subroutine checks ifthe motor speed is currently being ramped up at block 968 (this is amaximum force condition). If yes, the routine skips to block 984. If no,the subroutine checks if the measured RPM period is longer than theallowable RPM period. If no, the subroutine continues at block 984.

If either the RPM signal has timed out (block 966) or the RPM period islonger than allowable (block 970), this is an indication of anobstruction or the door has reached the DOWN limit position, and thesubroutine skips to block 972. At block 972, the subroutine checks ifthe door is positioned beyond the DOWN limit setting. If it is, thesubroutine skips to block 990 where it checks if the motor has beenpowered for at least one second. This one second power period after theDOWN limit has been reached provides for the door to close fully againstthe floor. This is especially important when DC motors are used. The onesecond period overcomes the internal braking effect of the DC motor onshut-off. Auto-reverse is disabled after the position detector reachesthe DOWN limit.

If the motor has been running for one second, at block 990, thesubroutine sets the reason as reaching the limit at block 994. Thesubroutine then checks if the limits are being trained at block 998. Ifyes, the limit training machine is updated at block 1002. If no, themotor's power is set to zero and the motor state is set at the DOWNposition in block 1006. In block 1008 the subroutine returns.

If the motor has not been running for at least one second at block 990,the subroutine sets the reason as early limit at block 1026. Then thesubroutine sets the motor power at zero and the motor state asauto-reverse at block 1028 and returns at block 1030.

Returning to block 984, the subroutine checks if the door's position iscurrently unknown. If yes, the subroutine skips to block 1004. If no,the subroutine updates the door's distance from the DOWN limit usinginternal RAM in microprocessor 300 in block 986. Then the subroutinechecks at block 988 if the door is three inches beyond the DOWN limit.If yes, the subroutine skips to block 990. If no, the subroutine checksif the door is being positioned manually in the training cycle at block992. If yes, the subroutine skips to block 1004. If no, the subroutinechecks if the door is within the slow DOWN distance of the limit atblock 996. If no, the subroutine skips to block 1004. If yes, thesubroutine sets the motor slow down flag at block 1000.

At block 1004, the subroutine checks if a wall control command or radiocommand has been received. If yes, the subroutine sets the motor powerat zero and the state as auto-reverse at block 1012. If no, thesubroutine checks if the motor has been running for over 27 seconds atblock 1010. If yes, the subroutine sets the motor power at zero and thestate at auto-reverse. If no, the subroutine checks if the obstacledetector signal has been missing for 12 milliseconds or more at block1014 indicating the presence of the obstacle or the failure of thedetector. If no, the subroutine returns at block 1018. If yes, thesubroutine checks if the wall control or radio signal is being held tooverride the infrared obstacle detector at block 1016. If yes, thesubroutine returns at block 1018. If no, the subroutine sets the reasonas infrared obstacle detector obstruction at block 1020. The subroutinethen sets the motor power at zero and the state as auto-reverse at block1022 and returns at block 1024. (The auto-reverse routine stops themotor for 0.5 seconds then causes the door to travel up.) The appendixattached hereto includes a source listing of a series of routines usedto operate a movable barrier operator in accordance with the presentinvention.

While there has been illustrated and described a particular embodimentof the present invention, it will be appreciated that numerous changesand modifications will occur to those skilled in the art, and it isintended in the appended claims to cover all those changes andmodifications which followed in the true spirit and scope of the presentinvention.

1. A barrier movement operator comprising: a barrier movement controllerfor controlling a position of the barrier and having a digital dataoutput port; a wall control comprising apparatus for generating signalsto control the barrier movement controller; a communication busconnecting the barrier movement controller and the wall control and forconveying electrical power from the barrier movement controller to thewall control for powering the functions of the wall control.
 2. Abarrier movement operator according to claim 1 wherein the barriermovement controller comprises apparatus for transmitting and receivingdigital data at the output port.
 3. A barrier movement operatoraccording to claim 1 where data is communicated and power is conveyedvia two conductors of the communication bus.
 4. A barrier movementoperator according to claim 3 wherein the communication bus comprisestwo conductors.
 5. A barrier movement operator according to claim 1wherein the barrier movement controller stores protocols for digitaldata communication via the communication bus.